home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 013 / mousemove.bas < prev    next >
BASIC Source File  |  1995-03-17  |  941b  |  31 lines

  1. 0     scnclr
  2. 10    rgb 0,15,0,0
  3. 20    dim a%(15000)
  4. 30    def fna(x)=int(rnd*x)+1
  5. 40    ask window width%,height%
  6. 50    for x=1 to 100
  7. 60    pena fna(15)
  8. 70    area(fna(width%),fna(height%) to fna(width%),fna(height%) to fna(width%),fna(height%))
  9. 80    next x
  10. 90    ask mouse x%,y%,b%
  11. 100   if b%=0 then 90
  12. 110   gosub 240:if st then 90
  13. 120   ask mouse x2%,y2%,b%
  14. 130   if (x%=x2%) and (y%=y2%) then 90
  15. 131   drawmode 2:box(x%,y%;x2%,y2%):box(x%,y%;x2%,y2%):drawmode 0
  16. 150   if b%=4 then 120
  17. 160   box(x%,y%;x2%,y2%)
  18. 170   if x2%>x% then x2%=x2%+1 else if x2%<x% then x2%=x2%-1
  19. 180   if y2%>y% then y2%=y2%+1 else if y2%<y% then y2%=y2%-1
  20. 190   sshape(x%,y%;x2%,y2%),a%()
  21. 195   get a$:if a$=chr$(13) then 90
  22. 200   ask mouse x%,y%,b%
  23. 210   if b%=0 then 195
  24. 220   gshape(x%,y%),a%()
  25. 230   goto 195
  26. 240   '
  27. 250   if (x%<0) or (y%<0) then st=-1:return
  28. 260   if x%>width% then st=-1:return
  29. 270   if y%>height% then st=-1:return
  30. 280   st=0:return
  31.